package com.gzs.learn.payment.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gzs.learn.payment.inf.dto.web.req.PaymentChannelSearchDto;
import com.gzs.learn.payment.model.po.PaymentChannelConfig;
import org.apache.ibatis.annotations.Param;

/**
 * 支付配置Mapper接口
 *
 * @author guanzhisong
 * @date 2021-08-25
 */
public interface PaymentChannelConfigMapper extends BaseMapper<PaymentChannelConfig> {
    /**
     * 根据渠道号查询支付配置
     *
     * @param channelId
     * @return
     */
    PaymentChannelConfig getByChannelId(@Param("channelId") Integer channelId);

    /**
     * 查询支付配置列表
     *
     * @param page      分页参数
     * @param searchDto 搜索对象
     * @return 支付配置集合
     */
    IPage<PaymentChannelConfig> searchList(Page<?> page, @Param("searchDto") PaymentChannelSearchDto searchDto);

    /**
     * 批量删除支付配置
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    int deletePaymentChannelConfigByIds(Long[] ids);
}
